package com.marsoft.test.utils;

import com.marsoft.test.exception.DefinitionException;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 *
 * @author jia
 */
public class CompareDateUtils {

    public static boolean compareDate(String date1, String date2){

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");

        boolean flag = false;

        try {

            if(simpleDateFormat.parse(date1).getTime() >=
                    simpleDateFormat.parse(date2).getTime()){

                flag = true;

            }
        } catch (ParseException e) {

            e.printStackTrace();
        }

        return flag;
    }
 }
